package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.service.autofill.FillEventHistory;
import android.view.View;
import android.widget.Button;

import com.example.myapplication.finger_guess.JiaActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {
    Button btn1,btn2,btn3,btn4,btn5;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        btn1 = findViewById(R.id.btn1);
        btn2 = findViewById(R.id.btn2);
        btn3 = findViewById(R.id.btn3);
        btn4 = findViewById(R.id.btn4);
        btn5 = findViewById(R.id.btn5);
        btn1.setOnClickListener(this);
        btn2.setOnClickListener(this);
        btn3.setOnClickListener(this);
        btn4.setOnClickListener(this);
        btn5.setOnClickListener(this);




    }

    @Override
    public void onClick(View v) {
        Intent intent=new Intent();
        switch (v.getId()){
            case R.id.btn1:
                intent.setClass(this,RegActivity.class);
                startActivity(intent);
                break;
            case  R.id.btn2:
                intent.setClass(this,CalculateActivity.class);
                startActivity(intent);
                break;
            case  R.id.btn3:
                intent.setClass(this, JiaActivity.class);
                startActivity(intent);
                break;
            case  R.id.btn4:

                break;
            case  R.id.btn5:

                break;
        }
    }
}

